home *** CD-ROM | disk | FTP | other *** search
/ DS-CD ROM 2 1993 August / DS CD-ROM 2.Ausgabe (August 1993).iso / programm / ds0594 / dbcomp.asc < prev    next >
Text File  |  1993-05-31  |  7KB  |  156 lines

  1.     1  * Version 00 - 08.06.93 / 21:57:05
  2.     2  * Name: DBCOMP.PRG
  3.     3  * Bearbeitet mit LISTER SHAREWARE-Version 3.3, (C) 1993 B. Hohenester ***
  4.     4  *                                                                       *
  5.     5  *  ▄▄▄▄   ▄▄▄▄         ▄▄▄▄   ▄▄▄▄       ▄▄▄▄   ▄▄▄▄       ▄▄▄▄   ▄▄▄▄  *
  6.     6  * █    █ █    █       █    █ █    █     █    █ █    ▀     █    █ ▀    █ *
  7.     7  * █    █ █    █       █    █ █    █     █    █ █          █    █      █ *
  8.     8  * █    █ █    █  ▄▄▄▄ █    █  ▀▄▄▀      █    █ █▄▄▄▄      ▀▄▄▄▄█    ▄▄▀ *
  9.     9  * █    █ █    █       █    █ ▄▀  ▀▄     █    █ █    █          █      █ *
  10.    10  * █    █ █    █       █    █ █    █ ▄▄  █    █ █    █ ▄▄  ▄    █ ▄    █ *
  11.    11  *  ▀▀▀▀   ▀▀▀▀         ▀▀▀▀   ▀▀▀▀  ▀▀   ▀▀▀▀   ▀▀▀▀  ▀▀   ▀▀▀▀   ▀▀▀▀  *
  12.    12  *                                                                       *
  13.    13  *************************************************************************
  14.    14  *************************************************************************
  15.    15  *                                                                       *
  16.    16  *  BESCHREIBUNG:                                                        *
  17.    17  *  Das Programm kompiliert alle PRG-Dateien eines Verzeichnisses        *
  18.    18  *                                                                       *
  19.    19  *************************************************************************
  20.    20  *                                                                       *
  21.    21  *  PROZEDUREN und FUNKTIONEN:                                           *
  22.    22  *                                                                       *
  23.    23  *    procedure COMPFEHLER - gibt Compilerfehler aus                     *
  24.    24  *                                                                       *
  25.    25  *************************************************************************
  26.    26  *                                                                       *
  27.    27  *  DATEIEN im Zugriff:                                                  *
  28.    28  *    DBCOMP.DBF           - enthält Dateinamen der PRG-Dateien          *
  29.    29  *                                                                       *
  30.    30  *************************************************************************
  31.    31  *                                                                       *
  32.    32  *  VARIABLEN:                                                           *
  33.    33  *                                                                       *
  34.    34  *************************************************************************
  35.    35  *                                                                       *
  36.    36  *  ÄNDERUNGEN:                                                          *
  37.    37  *                                                                       *
  38.    38  *********************** COPYRIGHT B. HOHENESTER *************************
  39.    39  clear all
  40.    40  clear windows
  41.    41  close all
  42.    42  close procedure
  43.    43  set console on
  44.    44  set carry off
  45.    45  set century off
  46.    46  set clock off
  47.    47  set delimiters to ""
  48.    48  set delimiters off
  49.    49  set device to screen
  50.    50  set echo off
  51.    51  set escape on
  52.    52  set exact off
  53.    53  set exclusive on
  54.    54  set lock on
  55.    55  set message to ""
  56.    56  set near off
  57.    57  set print off
  58.    58  set reprocess to 4
  59.    59  set safety off
  60.    60  set status off
  61.    61  set scoreboard on
  62.    62  set talk off
  63.    63  clear
  64.    64  define window compfehler from 3, 10 to 20, 70
  65.    65  @ 1, 2 to 14, 75 double
  66.    66  @ 2, 4 say "DBCOMP.PRG"
  67.    67  @ 2, 20 say "(C) 1990 Manfred Hoffbauer"
  68.    68  @ 2, 58 say "Datum: "
  69.    69  @ 2, 65 say date()
  70.    70  @ 3, 4 say "überarbeitet und erweitert von B. HOHENESTER  (C) 1990"
  71.    71  @ 4, 3 say "---...---"
  72.    72  @ 5, 4 say "Tool zum Compilieren aller PRG - Dateien eines Verzeichnisses. "
  73.    73  @ 6, 3 say "---...---"
  74.    74  @ 7, 4 say 'Bitte drücken Sie "J", um mit dem Zusatz RUNTIME zu compilieren '
  75.    75  @ 8, 4 say 'oder "N" für ohne RUNTIME:'
  76.    76  @ 9, 3 say "---...---"
  77.    77  wahl = "J"
  78.    78  @ 8, 33 get wahl picture "@! A" valid wahl $ "JN"
  79.    79  read
  80.    80  altdir = left(set("Directory") + replicate(" ", 68), 68)
  81.    81  korrekt = .F.
  82.    82 ┌do while .NOT. korrekt
  83.    83 │  @ 10, 4 say "Bitte geben Sie das zu bearbeitende Verzeichnis ein: "
  84.    84 │  verzeichnis = left(set("Directory") + replicate(" ", 68), 68)
  85.    85 │  @ 11, 4 get verzeichnis
  86.    86 │  read
  87.    87 │  korrekt = .T.
  88.    88 │  on error korrekt = .F.
  89.    89 │  set directory to &verzeichnis
  90.    90 │  on error
  91.    91 └enddo
  92.    92  @ 12, 3 say "---...---"
  93.    93  save screen to bildschirm
  94.    94  run dir *.prg > temp.dat
  95.    95  restore screen from bildschirm
  96.    96  release screen bildschirm
  97.    97  use dbcomp
  98.    98  zap
  99.    99  append from temp.dat sdf
  100.   100  erase temp.dat
  101.   101  delete all for (.NOT. file(ltrim(rtrim(name)) + "." + ltrim(rtrim(extension)))) .OR. (name = "DBCOMP") .OR. (extension <> "PRG")
  102.   102  pack
  103.   103  go top
  104.   104  zaehler2 = reccount()
  105.   105  zaehler1 = 0
  106.   106  @ 15, 14 to 17, 65                               && Rahmen zeichnen
  107.   107  @ 16, 15 say replicate("░", 50)                  && Rahmen ausfüllen
  108.   108  set console off
  109.   109  on error do compfehler
  110.   110  set alternate to fehler.dat
  111.   111 ┌do while .NOT. eof()
  112.   112 │  prgname = ltrim(rtrim(name)) + "." + ltrim(rtrim(extension))
  113.   113 │  @ 13, 4 say "In Arbeit: "
  114.   114 │  @ 13, 16 say prgname + replicate(" ", 12)
  115.   115 │  set alternate on
  116.   116 │  ? replicate("*", 70)
  117.   117 │  ? prgname
  118.   118 │ ┌if wahl = "J"
  119.   119 │ │  compile &prgname runtime
  120.   120 │ ├else
  121.   121 │ │  compile &prgname
  122.   122 │ └endif
  123.   123 │  set alternate off
  124.   124 │  zaehler1 = zaehler1 + 1
  125.   125 │  prozent = (zaehler1 / zaehler2) * 100
  126.   126 │  @ 16, 15 say replicate("▓", int(prozent / 2)) + replicate("░", 50 - int(prozent / 2))
  127.   127 │  select dbcomp
  128.   128 │  skip + 1
  129.   129 └enddo
  130.   130  set alternate to
  131.   131  set directory to &altdir
  132.   132  release window compfehler
  133.   133  set console on
  134.   134  on error
  135.   135  clear all
  136.   136  clear windows
  137.   137  close all
  138.   138  close procedure
  139.   139  return
  140.   140  *********************************************************************
  141.   141  procedure compfehler
  142.   142  activate window compfehler
  143.   143  set alternate off
  144.   144  set console on
  145.   145  ? "Fehler beim Compilieren der Datei: " + prgname
  146.   146  ? "Compiler-Fehlernummer: "
  147.   147  ?? cerror()
  148.   148  ? "Fehler: "
  149.   149  ?? message()
  150.   150  ? "Bitte eine Taste drücken, um fortzufahren."
  151.   151  i = inkey(0)
  152.   152  set console off
  153.   153  set alternate on
  154.   154  deactivate window compfehler
  155.   155  return
  156.   156  *********************************************************************